#ifndef LINKLIST_H_
#define LINKLIST_H_
#include "../adt.h"

typedef struct Node
{
    ElemType data;
    struct Node *next;
} Node;

typedef struct Node *LinkList;

/*get the index element*/
Status GetElem(LinkList L, int i, ElemType *e);

/*insert element before index*/
Status LinkInsert(LinkList *L, int i, ElemType e);

/*Delete the index element*/
Status ListDelete(LinkList *L, int i, ElemType *e);

/*random generate n element, create linklist with head node*/
void CreateListHead(LinkList *L, int n);

/*random generate n element, create linklist with head node,(tail method)*/
void CreateListTail(LinkList *L, int n);

/*Clear linklist*/
Status ClearList(LinkList *L);
#endif